home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Utilities / AmiBroker / AFL / Commentaries / CCI.afl next >
Text File  |  1999-02-28  |  906b  |  34 lines

  1. /* Project:       AmiBroker
  2. ** File:          cci.afl
  3. ** Title:         CCI Guru Commentary Example (English)
  4. ** Requirements:  AFL 1.1 (AmiBroker 3.0) or above
  5. ** Date:          Feb 9th, 1999
  6. ** Written by:    Tomasz Janeczko
  7. */ 
  8.  
  9. buy=cross( cci(), -100 );
  10. sell = cross( 100, cci() );
  11.  
  12. "Review of " + fullname() + " (" + name() + ")" + "\nas of " + date();
  13.  
  14.  
  15. "\nCurrent Statistics\n";
  16. "Close:    " + WriteVal(Close);
  17. "Change:   " + WriteVal(Close - Ref( Close, -1 ) ) ;
  18. "CCI Value:" + WriteVal(CCI());
  19.  
  20. "\nCCI is now in "+
  21. writeif( cci() < -100, "oversold", 
  22. writeif( cci() > 100,  "overbought", "neutral" )) +
  23. " range";
  24.  
  25. bsbuy  = barssince( buy );
  26. bssell = barssince( sell );
  27.  
  28. "\nCCI has generated "+
  29. writeif( bsbuy > 5 AND bssell > 5, "no signals during last 5 periods.",
  30. writeif( bsbuy < bssell, "buy signal " + writeval( bsbuy, 3.0  ),
  31. "sell signal " + writeval( bssell, 3.0) ) + " periods ago.");
  32.  
  33.  
  34.